import App from './App'
import store from './store'
// Components 为上面在 index.js 文件中默认导出的对象
// vue2.0
import  Global  from './common/Config.js'
Vue.prototype.$Global = Global
// 注册组件
import  mpselect  from './components/mp-select.vue'
Vue.component('mp-select', mpselect)

// 注册组件
import  skillitem  from './components/skill-item.vue'
Vue.component('skill-item', skillitem)

// vue3.0// 全局注册使用
import {
  getPlatform,
  navTo,
  showToast,
  showSuccess,
  showError,
  getShareUrlParams
} from './core/app'

Vue.config.productionTip = false

import bootstrap from './core/bootstrap'
Vue.created = bootstrap
// 挂载全局函数
Vue.prototype.$toast = showToast
Vue.prototype.$success = showSuccess
Vue.prototype.$error = showError
Vue.prototype.$navTo = navTo
Vue.prototype.$getShareUrlParams = getShareUrlParams
Vue.prototype.$store= store


// // 实例化应用
// const app = new Vue({
//   ...App,
//   store,
//   created: bootstrap
// })
// app.$mount()

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App,
	created: bootstrap
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createApp } from 'vue'
import  Global  from './common/Config.js'
Vue.prototype.$Global = Global
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif